package com.ahwei.service.impl;

import com.ahwei.dao.user.BrowseDao;
import com.ahwei.pojo.Browse;
import com.ahwei.service.BrowseService;
import com.ahwei.util.MyBatisUtils;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import java.util.List;

/**
 * @author：ahwei163@qq.com
 *
 * @date: 202*-03-20 12:57:29
 * @description: 这是一个Java文件！
 */
public class BrowseServiceImpl implements BrowseService {
    private final SqlSession sqlSession = MyBatisUtils.getSqlSession(true);
    private final BrowseDao browseDao = sqlSession.getMapper(BrowseDao.class);

@Test
    public void test(){
    List<Browse> browseList = browseDao.findByUid(1);
}
    @Override
    public List<Browse> findBrowseByUid(long uid) {
        return browseDao.findByUid(uid);
    }

    @Override
    public int addBrowse(Browse browse) {
        return browseDao.add(browse);
    }

    @Override
    public int deleteBrowse(long uid) {
        return browseDao.delete(uid);
    }
}
